import request from '@/utils/request'

// 查询任务列表
export function queryTaskList(data) {
  return request({
    url: '/console/task/taskList',
    method: 'post',
    data: data
  })
}

// 添加任务
export function addTask(data) {
  return request({
    url: '/console/task/taskSave',
    method: 'post',
    data: data
  })
}

// 删除任务
export function deleteTask(data) {
  return request({
    url: '/console/task/taskDel',
    method: 'post',
    data: data
  })
}

// 修改
export function updateTask(data) {
  return request({
    url: '/console/task/taskUpdate',
    method: 'post',
    data: data
  })
}

//查询任务详情
export function queryTask(data) {
  return request({
    url: '/console/task/taskDetail',
    method: 'post',
    data: data
  })
}

//代办任务
export function waitedTaskList(data) {
  return request({
    url: '/console/task/waitedTaskList',
    method: 'post',
    data: data
  })
}

//查看申请详情
export function formDataShow(data) {
  return request({
    url: '/console/task/applyDetail/'+data,
    method: 'get'
  })
}

//审核
export function formDataSave(taskId,data) {
  return request({
    url: '/console/task/applyCheck/'+taskId,
    method: 'post',
    data: data
  })
}

//查看申请详情
export function taskDetail(taskId) {
  return request({
    url: '/console/task/detail/'+taskId,
    method: 'get'
  })
}
